<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Memcached类</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="memcached.sessions.html">« Sessions支持</a></li>
      <li style="float: right;"><a href="memcached.add.html">Memcached::add »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.memcached.html">Memcached</a></li>
    <li>Memcached类</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.memcached" class="reference">

 <h1 class="title">Memcached类</h1>
 

 <div class="partintro"><p class="verinfo">(PECL memcached &gt;= 0.1.0)</p>


  <div class="section" id="memcached.intro">
   <h2 class="title">简介</h2>
   <p class="para">
   表征到memcached服务集群的连接。
   </p>
  </div>


  <div class="section" id="memcached.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">Memcached</strong>
     </span>
     {</div>

    
    <div class="constructorsynopsis dc-description">
   <span class="methodname"><a href="memcached.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$persistent_id</code><span class="initializer"> = ?</span></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.add.html" class="methodname">add</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.addbykey.html" class="methodname">addByKey</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span><br>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.addserver.html" class="methodname">addServer</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$weight</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.addservers.html" class="methodname">addServers</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$servers</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.append.html" class="methodname">append</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.appendbykey.html" class="methodname">appendByKey</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.cas.html" class="methodname">cas</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">float</span> <code class="parameter">$cas_token</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span><br>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.casbykey.html" class="methodname">casByKey</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">float</span> <code class="parameter">$cas_token</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span><br>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.decrement.html" class="methodname">decrement</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code><span class="initializer"> = 1</span></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.decrementbykey.html" class="methodname">decrementByKey</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code><span class="initializer"> = 1</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$initial_value</code><span class="initializer"> = 0</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$expiry</code><span class="initializer"> = 0</span></span><br>): <span class="type"><span class="type">int</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.delete.html" class="methodname">delete</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$time</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.deletebykey.html" class="methodname">deleteByKey</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$time</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.deletemulti.html" class="methodname">deleteMulti</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$keys</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$time</code><span class="initializer"> = 0</span></span>): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.deletemultibykey.html" class="methodname">deleteMultiByKey</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$keys</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$time</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.fetch.html" class="methodname">fetch</a></span>(): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.fetchall.html" class="methodname">fetchAll</a></span>(): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.flush.html" class="methodname">flush</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$delay</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.get.html" class="methodname">get</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><span class="type callback">callback</span></span> <code class="parameter">$cache_cb</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">float</span> <code class="parameter reference">&$cas_token</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getallkeys.html" class="methodname">getAllKeys</a></span>(): <span class="type"><span class="type">array</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getbykey.html" class="methodname">getByKey</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type callback">callback</span></span> <code class="parameter">$cache_cb</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">float</span> <code class="parameter reference">&$cas_token</code><span class="initializer"> = ?</span></span><br>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getdelayed.html" class="methodname">getDelayed</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$keys</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$with_cas</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type"><span class="type callback">callback</span></span> <code class="parameter">$value_cb</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getdelayedbykey.html" class="methodname">getDelayedByKey</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">array</span> <code class="parameter">$keys</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">bool</span> <code class="parameter">$with_cas</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type callback">callback</span></span> <code class="parameter">$value_cb</code><span class="initializer"> = ?</span></span><br>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getmulti.html" class="methodname">getMulti</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$keys</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getmultibykey.html" class="methodname">getMultiByKey</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">array</span> <code class="parameter">$keys</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter reference">&$cas_tokens</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = ?</span></span><br>): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getoption.html" class="methodname">getOption</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getresultcode.html" class="methodname">getResultCode</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getresultmessage.html" class="methodname">getResultMessage</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getserverbykey.html" class="methodname">getServerByKey</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getserverlist.html" class="methodname">getServerList</a></span>(): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getstats.html" class="methodname">getStats</a></span>(): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.getversion.html" class="methodname">getVersion</a></span>(): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.increment.html" class="methodname">increment</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code><span class="initializer"> = 1</span></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.incrementbykey.html" class="methodname">incrementByKey</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code><span class="initializer"> = 1</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$initial_value</code><span class="initializer"> = 0</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$expiry</code><span class="initializer"> = 0</span></span><br>): <span class="type"><span class="type">int</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.ispersistent.html" class="methodname">isPersistent</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.ispristine.html" class="methodname">isPristine</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.prepend.html" class="methodname">prepend</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.prependbykey.html" class="methodname">prependByKey</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.quit.html" class="methodname">quit</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.replace.html" class="methodname">replace</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.replacebykey.html" class="methodname">replaceByKey</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span><br>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.resetserverlist.html" class="methodname">resetServerList</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.set.html" class="methodname">set</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.setbykey.html" class="methodname">setByKey</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span><br>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.setmulti.html" class="methodname">setMulti</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$items</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.setmultibykey.html" class="methodname">setMultiByKey</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$items</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.setoption.html" class="methodname">setOption</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.setoptions.html" class="methodname">setOptions</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.setsaslauthdata.html" class="methodname">setSaslAuthData</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$username</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.touch.html" class="methodname">touch</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="memcached.touchbykey.html" class="methodname">touchByKey</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$expiration</code></span>): <span class="type">bool</span></div>

   }</div>


  </div>
  
 </div>

 










































































































































































































































































































































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="memcached.add.html">Memcached::add</a> — 向一个新的key下面增加一个元素</li><li><a href="memcached.addbykey.html">Memcached::addByKey</a> — 在指定服务器上的一个新的key下增加一个元素</li><li><a href="memcached.addserver.html">Memcached::addServer</a> — 向服务器池中增加一个服务器</li><li><a href="memcached.addservers.html">Memcached::addServers</a> — 向服务器池中增加多台服务器</li><li><a href="memcached.append.html">Memcached::append</a> — 向已存在元素后追加数据</li><li><a href="memcached.appendbykey.html">Memcached::appendByKey</a> — 向指定服务器上已存在元素后追加数据</li><li><a href="memcached.cas.html">Memcached::cas</a> — 比较并交换值</li><li><a href="memcached.casbykey.html">Memcached::casByKey</a> — 在指定服务器上比较并交换值</li><li><a href="memcached.construct.html">Memcached::__construct</a> — 创建一个Memcached实例</li><li><a href="memcached.decrement.html">Memcached::decrement</a> — 减小数值元素的值</li><li><a href="memcached.decrementbykey.html">Memcached::decrementByKey</a> — Decrement numeric item's value, stored on a specific server</li><li><a href="memcached.delete.html">Memcached::delete</a> — 删除一个元素</li><li><a href="memcached.deletebykey.html">Memcached::deleteByKey</a> — 从指定的服务器删除一个元素</li><li><a href="memcached.deletemulti.html">Memcached::deleteMulti</a> — Delete multiple items</li><li><a href="memcached.deletemultibykey.html">Memcached::deleteMultiByKey</a> — Delete multiple items from a specific server</li><li><a href="memcached.fetch.html">Memcached::fetch</a> — 抓取下一个结果</li><li><a href="memcached.fetchall.html">Memcached::fetchAll</a> — 抓取所有剩余的结果</li><li><a href="memcached.flush.html">Memcached::flush</a> — 作废缓存中的所有元素</li><li><a href="memcached.get.html">Memcached::get</a> — 检索一个元素</li><li><a href="memcached.getallkeys.html">Memcached::getAllKeys</a> — Gets the keys stored on all the servers</li><li><a href="memcached.getbykey.html">Memcached::getByKey</a> — 从特定的服务器检索元素</li><li><a href="memcached.getdelayed.html">Memcached::getDelayed</a> — 请求多个元素</li><li><a href="memcached.getdelayedbykey.html">Memcached::getDelayedByKey</a> — 从指定的服务器上请求多个元素</li><li><a href="memcached.getmulti.html">Memcached::getMulti</a> — 检索多个元素</li><li><a href="memcached.getmultibykey.html">Memcached::getMultiByKey</a> — 从特定服务器检索多个元素</li><li><a href="memcached.getoption.html">Memcached::getOption</a> — 获取Memcached的选项值</li><li><a href="memcached.getresultcode.html">Memcached::getResultCode</a> — 返回最后一次操作的结果代码</li><li><a href="memcached.getresultmessage.html">Memcached::getResultMessage</a> — 返回最后一次操作的结果描述消息</li><li><a href="memcached.getserverbykey.html">Memcached::getServerByKey</a> — 获取一个key所映射的服务器信息</li><li><a href="memcached.getserverlist.html">Memcached::getServerList</a> — 获取服务器池中的服务器列表</li><li><a href="memcached.getstats.html">Memcached::getStats</a> — 获取服务器池的统计信息</li><li><a href="memcached.getversion.html">Memcached::getVersion</a> — 获取服务器池中所有服务器的版本信息</li><li><a href="memcached.increment.html">Memcached::increment</a> — 增加数值元素的值</li><li><a href="memcached.incrementbykey.html">Memcached::incrementByKey</a> — Increment numeric item's value, stored on a specific server</li><li><a href="memcached.ispersistent.html">Memcached::isPersistent</a> — Check if a persitent connection to memcache is being used</li><li><a href="memcached.ispristine.html">Memcached::isPristine</a> — Check if the instance was recently created</li><li><a href="memcached.prepend.html">Memcached::prepend</a> — 向一个已存在的元素前面追加数据</li><li><a href="memcached.prependbykey.html">Memcached::prependByKey</a> — Prepend data to an existing item on a specific server</li><li><a href="memcached.quit.html">Memcached::quit</a> — 关闭所有打开的链接。</li><li><a href="memcached.replace.html">Memcached::replace</a> — 替换已存在key下的元素</li><li><a href="memcached.replacebykey.html">Memcached::replaceByKey</a> — Replace the item under an existing key on a specific server</li><li><a href="memcached.resetserverlist.html">Memcached::resetServerList</a> — Clears all servers from the server list</li><li><a href="memcached.set.html">Memcached::set</a> — 存储一个元素</li><li><a href="memcached.setbykey.html">Memcached::setByKey</a> — 将元素存储到指定的服务器上</li><li><a href="memcached.setmulti.html">Memcached::setMulti</a> — 存储多个元素</li><li><a href="memcached.setmultibykey.html">Memcached::setMultiByKey</a> — Store multiple items on a specific server</li><li><a href="memcached.setoption.html">Memcached::setOption</a> — 设置一个memcached选项</li><li><a href="memcached.setoptions.html">Memcached::setOptions</a> — Set Memcached options</li><li><a href="memcached.setsaslauthdata.html">Memcached::setSaslAuthData</a> — Set the credentials to use for authentication</li><li><a href="memcached.touch.html">Memcached::touch</a> — Set a new expiration on an item</li><li><a href="memcached.touchbykey.html">Memcached::touchByKey</a> — Set a new expiration on an item on a specific server</li></ul>
</div>
</div></div></body></html>